public class Course {
    // 属性
    public String id;
    public String name;
    public String location;
    public String time;
    public String teacherName;
    public int maxStudents;
    public int currentStudents;

    // 构造方法
    public Course(String id, String name, String location, String time, int maxStudents) {
        this.id = id;
        this.name = name;
        this.location = location;
        this.time = time;
        this.maxStudents = maxStudents;
        this.currentStudents = 0;
        this.teacherName = "未分配";
    }

    // 检查课程是否已满
    public boolean isFull() {
        return currentStudents >= maxStudents;
    }

    // 显示课程信息
    public void showInfo() {
        System.out.println("课程编号: " + id);
        System.out.println("课程名称: " + name);
        System.out.println("上课地点: " + location);
        System.out.println("上课时间: " + time);
        System.out.println("授课教师: " + teacherName);
        System.out.println("人数: " + currentStudents + "/" + maxStudents);
        System.out.println("-------------------");
    }
}